
1. SearchNodes(query)
Description: Searches for nodes in the knowledge graph based on the surface name.
Example 1: To find "obama": SearchNodes("obama") will return: ['"Barack Obama" | Description: president of the United States from 2009 to 2017.', ...].
Example 2: To find a village "Bush": SearchNodes("Bush") will return: ['"Bush" | Description: Bush are a British rock band formed in London in 1992. The band found their immediate success with t...| Description: Bush is a village in Williamson County, Illinois, United States. As of the 2000 census, the village ...|]. It means that there are multiple entities named "Bush" in the KG, you can use both name and description to distinguish them, for example: SELECT ?e WHERE { ?e ns:type.object.name "Bush"@en . ?e ns:common.topic.description ?desc . FILTER(REGEX(?desc, "Bush is a village in Williamson County, Illinois")) }

2. ExecuteSPARQL(sparql)
Description: Execute a SPARQL query. You can explore the KG freely using this tool.
Example 1: If you want to check the birthplace of "Barack Obama" is "Honolulu" or not, just: ExecuteSPARQL('ASK { ?e ns:type.object.name "Barack Obama"@en . ?e ns:people.person.place_of_birth ?e1 . ?e1 ns:type.object.name "Honolulu"@en . }').

3. SearchGraphPatterns(sparql, semantic)
Description: Parameter `sparql` MUST start with ["SELECT ?e WHERE"]. The tool will query the subgraphs with ?e as the head or tail entities, respectively, and return them together. The `semantic` parameter indicates the expected predicate semantics. If provided, the tool will sort the queried subgraphs by semantics. If not, the tool returns the entire subgraph. Note! This tool will return a randomly instantiated triple, you should pay attention to the semantics of the predicate, not the specific names of the head entity or the tail entity. In Freebase, due to the use of "Compound Value Type" (CVT) to represent an event, a one-hop relationship semantically requires two hops in Freebase. For example, the statement "Tom Hanks is an actor in the film Catch Me If You Can" is represented as follows: (?e0 type.object.name "Tom Hanks"@en . ?e0 film.actor.film ?c . ?c film.performance.film ?e1 . ?e1 type.object.name "Catch Me If You Can"@en .) Therefore, if you search "an actor stars in a film", this tool will return "film.actor.film -> film.performance.film" and you should consider it as one-hop relationship. You can write down more than one synonyms to the `semantic` parameter if necessary.






